﻿@model Logistics.Models.CourierModel
@{
    Layout = null;
}

<!DOCTYPE html>
<html>
<!-- BEGIN HEAD -->
<head>
    <title>派件任务</title>
    <meta content="width=device-width, initial-scale=1.0" name="viewport" />
    <meta content="" name="description" />
    <meta content="" name="author" />
    <!-- BEGIN GLOBAL MANDATORY STYLES -->
    <link href="../media/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
    <link href="../media/css/bootstrap-responsive.min.css" rel="stylesheet" type="text/css" />
    <link href="../media/css/font-awesome.min.css" rel="stylesheet" type="text/css" />
    <link href="../media/css/style-metro.css" rel="stylesheet" type="text/css" />
    <link href="../media/css/style.css" rel="stylesheet" type="text/css" />
    <link href="../media/css/style-responsive.css" rel="stylesheet" type="text/css" />
    <link href="../media/css/default.css" rel="stylesheet" type="text/css" id="style_color" />
    <link href="../media/css/uniform.default.css" rel="stylesheet" type="text/css" />
    <!-- END GLOBAL MANDATORY STYLES -->
    <!-- BEGIN PAGE LEVEL STYLES -->
    <link rel="stylesheet" type="text/css" href="../media/css/select2_metro.css" />
    <link rel="stylesheet" href="../media/css/DT_bootstrap.css" />
    <!-- END PAGE LEVEL STYLES -->
    <link rel="shortcut icon" href="../media/image/favicon.ico" />
</head>
<!-- END HEAD -->
<!-- BEGIN BODY -->
<body class="page-header-fixed">
    <!-- BEGIN HEADER -->
    @RenderPage("../Common/header.cshtml");
    <!-- END HEADER -->
    <!-- BEGIN CONTAINER -->
    <div class="page-container">
        <!-- BEGIN SIDEBAR -->
        <div class="page-sidebar nav-collapse collapse">
            <!-- BEGIN SIDEBAR MENU -->
            @RenderPage("../Common/menu.cshtml");
            <!-- END SIDEBAR MENU -->
        </div>
        <!-- END SIDEBAR -->
        <!-- BEGIN PAGE -->
        <div class="page-content">
            <!-- BEGIN PAGE CONTAINER-->
            <div class="container-fluid">
                <!-- BEGIN PAGE HEADER-->
                <div class="row-fluid">
                    <div class="span12">
                        <!-- BEGIN PAGE TITLE & BREADCRUMB-->
                        <h3 class="page-title">
                            派件任务
                        </h3>
                        <ul class="breadcrumb">
                            <li>
                                <i class="icon-home"></i>
                                <a href="#">主页</a>
                                <i class="icon-angle-right"></i>
                            </li>
                            <li>
                                <a href="#">快递员</a>
                                <i class="icon-angle-right"></i>
                            </li>
                            <li>
                                <a href="#">派件任务</a>
                            </li>
                        </ul>
                        <!-- END PAGE TITLE & BREADCRUMB-->
                    </div>
                </div>
                <!-- END PAGE HEADER-->
                <!-- BEGIN PAGE CONTENT-->
                <div class="row-fluid">
                    <div class="span12">
                        <!-- BEGIN EXAMPLE TABLE PORTLET-->

                        <div class="portlet-body">
                            <table class="table table-striped table-bordered table-hover" id="sample_7">
                                <thead>
                                    <tr>
                                        <th style="width:8px;"><input type="checkbox" class="group-checkable" data-set="#sample_7 .checkboxes" /></th>
                                        <th>派送单号</th>
                                        <th class="hidden-480">快递单号</th>
                                        <th class="hidden-480">联系人</th>
                                        <th class="hidden-480">联系电话</th>
                                        <th class="hidden-480">派送地址</th>
                                        <th class="hidden-480">派送时间</th>
                                        <th class="hidden-480">状态</th>
                                        <th></th>
                                    </tr>
                                </thead>
                                <tbody>
                                    @foreach (var item in Model.DispatchtModel)
                                    {
                                        <tr class="odd gradeX">
                                            <td><input type="checkbox" class="checkboxes" value="1" /></td>
                                            <td class="hidden-480">@item.DispatchNo</td>
                                            <td class="hidden-480">@item.PackNo</td>
                                            <td class="hidden-480">@item.ToName</td>
                                            <td class="hidden-480">@item.ToTel</td>
                                            <td class="hidden-480">@item.ToAddresss</td>
                                            <td class="hidden-480">@item.DispatchTime</td>
                                            @if (item.DispatchStatus == 0)
                                            {
                                                <td><span class="label label-info">配送安排完成</span></td>
                                            }
                                            @if (item.DispatchStatus == 1)
                                            {
                                                <td><span class="label label-primary">派送中</span></td>
                                            }
                                            @if (item.DispatchStatus == 2)
                                            {
                                                <td><span class="label label-success">派送完成</span></td>
                                            }
                                            @if (item.DispatchStatus == 3)
                                            {
                                                <td><span class="label label-danger">退件中 </span></td>
                                            }
                                            <td class="hidden-480">
                                                @if (item.DispatchStatus == 0)
                                                {
                                                    @Html.ActionLink("确认派送", "AccpetSendPackageMethod", "CourierModels", new { id = item.DispatchNo }, new { @class = "btn mini red" })
                                                }
                                                @if (item.DispatchStatus == 1)
                                                {
                                                    @Html.ActionLink("派送完成", "FinishSendPackageMethod", "CourierModels", new { id = item.DispatchNo }, new { @class = "btn mini green" })
                                                    <span style="width:20px;"></span>
                                                    if (item.DispatchType == 0)
                                                    {
                                                        @Html.ActionLink("退件", "BackSendPackageMethod", "CourierModels", new { id = item.DispatchNo }, new { @class = "btn mini red" })
                                                    }
                                                }
                                            </td>
                                        </tr>
                                    }

                                </tbody>
                            </table>
                        </div>
                        <!-- END EXAMPLE TABLE PORTLET-->
                    </div>
                </div>
                <!-- END PAGE CONTAINER-->
            </div>
        </div>
        <!-- END PAGE -->
    </div>
    <!-- END CONTAINER -->
    <!-- BEGIN FOOTER -->
    @RenderPage("../Common/footer.cshtml");
    <!-- END FOOTER -->
    <!-- BEGIN JAVASCRIPTS(Load javascripts at bottom, this will reduce page load time) -->
    <!-- BEGIN CORE PLUGINS -->
    <script src="../media/js/jquery-1.10.1.min.js" type="text/javascript"></script>
    <script src="../media/js/jquery-migrate-1.2.1.min.js" type="text/javascript"></script>
    <!-- IMPORTANT! Load jquery-ui-1.10.1.custom.min.js before bootstrap.min.js to fix bootstrap tooltip conflict with jquery ui tooltip -->
    <script src="../media/js/jquery-ui-1.10.1.custom.min.js" type="text/javascript"></script>
    <script src="../media/js/bootstrap.min.js" type="text/javascript"></script>
    <!--[if lt IE 9]>
    <script src="../media/js/excanvas.min.js"></script>
    <script src="../media/js/respond.min.js"></script>
    <![endif]-->
    <script src="../media/js/jquery.slimscroll.min.js" type="text/javascript"></script>
    <script src="../media/js/jquery.blockui.min.js" type="text/javascript"></script>
    <script src="../media/js/jquery.cookie.min.js" type="text/javascript"></script>
    <script src="../media/js/jquery.uniform.min.js" type="text/javascript"></script>
    <!-- END CORE PLUGINS -->
    <!-- BEGIN PAGE LEVEL PLUGINS -->
    <script type="text/javascript" src="../media/js/select2.min.js"></script>
    <script type="text/javascript" src="../media/js/jquery.dataTables.js"></script>
    <script type="text/javascript" src="../media/js/DT_bootstrap.js"></script>
    <!-- END PAGE LEVEL PLUGINS -->
    <!-- BEGIN PAGE LEVEL SCRIPTS -->
    <script src="../media/js/app.js"></script>
    <script src="../media/js/table-managed.js"></script>
    <script>
    jQuery(document).ready(function() {
        App.init();
        TableManaged.init();
    });
    </script>
</body>
<!-- END BODY -->
</html>
